import { createRouter, createWebHistory } from 'vue-router'

export const router = createRouter({
    history: createWebHistory(),
    routes: [{
        path: '/',
        redirect: '/login',
    }, {
        path: '/login',
        component: () => import('./../view/login.vue'),
        meta: {
            title: '登录'
        }
    }, {
        path: '/home',
        component: () => import('./../view/index.vue'),
        children: [{
            path: '/home',
            component: () => import('./../view/home.vue'),
            meta: {
                title: '系统首页'
            }
        }, {
            path: '/summary',
            component: () => import('../view/assets/summary.vue'),
            meta: {
                title: '资产汇总'
            }
        }, {
            path: '/register',
            component: () => import('../view/assets/register.vue'),
            meta: {
                title: '资产登记'
            }
        }, {
            path: '/classificsettings',
            component: () => import('../view/assets/classificsettings.vue'),
            meta: {
                title: '资产分类设置'
            }
        }, {
            path: '/unit',
            component: () => import('../view/system/unit.vue'),
            meta: {
                title: '单位管理'
            }
        }, {
            path: '/subaccount',
            component: () => import('../view/system/subaccount.vue'),
            meta: {
                title: '子账号管理'
            }
        }]
    }]
})